#include "stdio.h"
#include "stdlib.h"
#include "binary_tree.h"

int main(int argc, char const *argv[])
{
    int length;
    int a[] = {5,6,3,4,1,7,9};
    binary_tree b_t;
    position p;
    
    length = sizeof(a)/sizeof(int);
    b_t = create(length, a);
    print(b_t);

    printf("NodeNum %d\n", getNodeNum(b_t));
    levelPrint(b_t);

    int nodes = 0;
    nodes = getNodeNum4n(b_t, 2);
    printf("nodes numbers %d\n", nodes);

    int leaves = 0;
    leaves = gettreeleveas(b_t);
    printf("leaves is %d\n", leaves);

    p = tail;
    while( p != NULL)
    {
        printf("%d\n", getElment(p));
        p = getLeftson(p);
    }

}